
public class ReverseString2 extends StringIndexOutOfBoundsException{
	
	public String Reverseme(String s){
		if (s.length() == 0){
			return "";
		}
		StringBuilder sb = new StringBuilder();
		for(int i = s.length()-1; i >=0; i--){
			sb.append(s.charAt(i));
		}
		return sb.toString();
	}
	
	public String ReverseString(String str){
		String result = "";
		for(int i= 0; i < str.length(); i++){
			result = str.charAt(i) + result;
		}
		
		return result;
	}
	public static void main(String args[]){
		ReverseString2 r = new ReverseString2();
		System.out.print(r.ReverseString("Bite Porcupine"));
	}

}
